// 2025/4/6
// https://leetcode.cn/problems/palindrome-number/description/
// 回文数

class Solution {
    public:
        bool isPalindrome(int x) {
            if(x < 0) return false;
            size_t rev = 0, tmp = x;
            while(tmp)
            {
                rev *= 10;
                rev += tmp % 10;
                tmp /= 10;
            }
            return rev == x;
        }
    };